<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="style.css">
</head>

<body>
    <form id="form1" name="form1" method="post" action="#" style="background-color:#6C3;width: 580px;margin: 0 auto;">
        <p align="center">关于盗版光盘网上调差</p>

        <table width="580" height="305" border="1" align="center" cellpadding="1" cellspacing="0">
            <tr>
                <td width="117" height="36">姓名：</td>
                <td width="125"><label for="username"></label>
                    <input type="text" name="username" id="username" /></td>
                <td width="99">年龄：</td>
                <td width="221">
                    <p>
                        <a href="" target="_"></a>
                        <label for="select"></label>
                        <select name="age" id="select">
                            <option value="1">16--20</option>
                            <option value="2">21--25</option>
                            <option value="3">26--30</option>
                        </select>
                        年龄段<br />
                    </p>
                </td>
            </tr>
            <tr>
                <td>E-MALl:</td>
                <td colspan="3"><label for="textfield2"></label>
                    <input type="text" name="email" id="email" /></td>
            </tr>
            <tr>
                <td>你买过盗版光盘吗？</td>
                <td colspan="3"><input type="radio" name="cd" value="true" />
                    <label for="radio">没买过
                        <input type="radio" name="cd" value="false" />
                        买过</label></td>
            </tr>
            <tr>
                <td>你需要哪些光盘：</td>
                <td colspan="3"><input type="checkbox" name="checkbox" id="checkbox" />
                    <label for="checkbox">操作系统</label> <label for="checkbox">
                        <input type="checkbox" name="checkbox2" id="checkbox2" />
                        工具软件
                        <input type="checkbox" name="checkbox3" id="checkbox3" />
                        图库
                        <input type="checkbox" name="checkbox4" id="checkbox4" />
                        其他</label></td>
            </tr>
            <tr>
                <td>我要说说：</td>
                <td colspan="3"><label for="textarea"></label>

                    <textarea name="comment" id="comment" cols="45" rows="5" required="required">   请在此输入你的看法或解决此现象的建议
----谢谢</textarea></td>
            </tr>
            <tr>
                <td colspan="4" align="center"><input type="submit" name="submit" id="submit" value="提   交" />
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <input type="reset" name="reset" id="reset" value="重   置" /></td>
            </tr>
        </table>
    </form>
    <script type="text/javascript">
        var form = document.getElementById("form1");
        var username = document.getElementById("username");
        var email = document.getElementById("email");
        var comment = document.getElementById("comment");
        form.onsubmit = function () {
            if (username.value.length === 0 || email.value.length === 0 || content.value.length === 0) {
                alert("请填写姓名，邮箱，我要说说");
                return false;
            }
            return true;
        }
    </script>
</body>

</html>